import request from '@/utils/request'

// 查询退库列表
export function listReturn(query) {
  return request({
    url: '/asset/return/list',
    method: 'get',
    params: query
  })
}

// 查询退库详细
export function getReturn(id) {
  return request({
    url: '/asset/return/' + id,
    method: 'get'
  })
}

// 新增退库
export function addReturn(data) {
  return request({
    url: '/asset/return',
    method: 'post',
    data: data
  })
}

// 修改退库
export function updateReturn(data) {
  return request({
    url: '/asset/return',
    method: 'put',
    data: data
  })
}

// 删除退库
export function delReturn(id) {
  return request({
    url: '/asset/return/' + id,
    method: 'delete'
  })
}

// 查询在用资产列表列表
export function listAsset(query) {
  return request({
    url: '/asset/asset/listUse',
    method: 'get',
    params: query
  })
}

// 查询部门下拉树结构
export function deptTreeSelect() {
  return request({
    url: '/system/user/deptTree',
    method: 'get'
  })
}
